package com.kamisama.utopia.repository;

import com.kamisama.utopia.entity.Character;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CharacterRepository extends JpaRepository<Character, Long> {
    List<Character> findAllByUserOpenId(String openId);

    int countAllByUserOpenId(String openId);

    Character findByIdAndUserOpenId(Long id, String openId);
}
